import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:niu_app/configs/app_style_config.dart';
import 'package:niu_app/pages/model/homepage/api_account_model.dart';
import 'package:niu_app/views/jk/jk_text.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class APIaccountWidget extends StatelessWidget {
  final ApiaccountModel dataModel;

  const APIaccountWidget({Key key, this.dataModel}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(10),
      child:Row(
        children: [
          Column(
            children: [
                first(),
                SizedBox(height: 10,),
                third(),
            ],
          ),
          Column(
            children: [
              second(),
              SizedBox(height: 10,),
              second()
            ],
          ),
        ],
      ),
    );
  }
  Widget first(){
    return SizedBox(
      height: 145.w,
      width: 176.w,
      child: Card(
        elevation: 0.8,
        color: AppStyleConfig.background,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
           Container(
             height: 32,
             width: 32,
             decoration: BoxDecoration(
               color: AppStyleConfig.TextColor,
               borderRadius: BorderRadiusDirectional.all(Radius.circular(75))
             ),
             child: Column(
               mainAxisAlignment: MainAxisAlignment.center,
               children: [
                 Icon(Icons.person,color: AppStyleConfig.background,),

               ],
             ),
           ),
            SizedBox(width: 10,),
            Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
               JKText(
                 data: "牛人账户",
                 fontSize: 16.w,
                 color: AppStyleConfig.TextColor,
               ),
                JKText(
                  data: "注册新的牛人账户",
                  fontSize: 10.w,
                  color: AppStyleConfig.color1,
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
  Widget second(){
    return SizedBox(
      height: 145.w,
      width: 176.w,
      child: Card(
        elevation: 0.8,
        color: AppStyleConfig.TextColor,
        child:Container(
          padding: EdgeInsets.all(10),
          child: Column(
            children: [
              Column(
                children: [
                  Row(
                    children: [
                      Image.asset('assets/boy2.png',height: 21.w,width: 21.w,),
                      SizedBox(width: 3,),
                      JKText(
                        data: "${dataModel.title}",
                        fontSize: 16.w,
                      )
                    ],
                  ),
                  Row(
                    children: [
                      JKText(
                        data: "${dataModel.title1}",
                        fontSize: 12.w,
                        color: AppStyleConfig.color1,
                      )
                    ],
                  ),
                  Row(
                    children: [
                      JKText(
                        data: "${dataModel.title4}",
                        fontSize: 12.w,
                        color: AppStyleConfig.color1,
                      )
                    ],
                  ),
                  SizedBox(height: 15.w,),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      Column(
                        children: [
                          JKText(
                            data: "${dataModel.number1}",
                            fontSize: 14.w,
                            color: AppStyleConfig.color3,
                          ),
                          JKText(
                            data: "${dataModel.title2}",
                            fontSize: 12.w,
                            color: AppStyleConfig.color2,
                          ),
                        ],
                      ),
                      Column(
                        children: [
                          JKText(
                            data: "${dataModel.number2}",
                            fontSize: 14.w,
                            color: AppStyleConfig.color3,
                          ),
                          JKText(
                            data: "${dataModel.title3}",
                            fontSize: 12.w,
                            color: AppStyleConfig.color2,
                          ),
                        ],
                      ),
                    ],
                  ),
                ],
              ),
            ],
          ),
        )
      ),
    );
  }
  Widget third(){
    return SizedBox(
      height: 145.w,
      width: 176.w,
      child: Card(
          elevation: 0.8,
          color: AppStyleConfig.TextColor,
          child:Container(
            padding: EdgeInsets.all(10),
            child: Column(
              children: [
                Column(
                  children: [
                    Row(
                      children: [
                        Image.asset('assets/boy2.png',height: 21.w,width: 21.w,),
                        SizedBox(width: 3,),
                        JKText(
                          data: "${dataModel.title}",
                          fontSize: 16.w,
                        )
                      ],
                    ),
                    Row(
                      children: [
                        JKText(
                          data: "${dataModel.title1}",
                          fontSize: 12.w,
                          color: AppStyleConfig.color1,
                        )
                      ],
                    ),
                    Row(
                      children: [
                        JKText(
                          data: "${dataModel.title4}",
                          fontSize: 12.w,
                          color: AppStyleConfig.color1,
                        )
                      ],
                    ),
                    SizedBox(height: 15.w,),
                    Row(
                      mainAxisAlignment: MainAxisAlignment.spaceAround,
                      children: [
                        Column(
                          children: [
                            JKText(
                              data: "${dataModel.number3}",
                              fontSize: 14.w,
                              color: AppStyleConfig.color3,
                            ),
                            JKText(
                              data: "${dataModel.title2}",
                              fontSize: 12.w,
                              color: AppStyleConfig.color2,
                            ),
                          ],
                        ),
                        Column(
                          children: [
                            JKText(
                              data: "${dataModel.number4}",
                              fontSize: 14.w,
                              color: AppStyleConfig.color3,
                            ),
                            JKText(
                              data: "${dataModel.title3}",
                              fontSize: 12.w,
                              color: AppStyleConfig.color2,
                            ),
                          ],
                        ),
                      ],
                    ),
                  ],
                ),
              ],
            ),
          )
      ),
    );
  }
}
